name: pre-commit run_id: commands[0] env HOME: /home/jenkins env LANG: C.UTF-8 env PATH: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-H2GK/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONHASHSEED: 3369982432 env PYTHONIOENCODING: utf-8 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/bgpcep-tox-verify-master/.tox env VIRTUAL_ENV: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit env __TOX_ENVIRONMENT_VARIABLE_ORIGINAL_CI: true metadata pid: 2393 cwd: /w/workspace/bgpcep-tox-verify-master allow: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit/bin/* cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Initializing environment for https://github.com/shellcheck-py/shellcheck-py. [INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier. [INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier:prettier@4.0.0-alpha.8. [INFO] Initializing environment for https://github.com/adrienverge/yamllint. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/shellcheck-py/shellcheck-py. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/mirrors-prettier. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/adrienverge/yamllint. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Passed fix end of files.........................................................Passed check yaml...............................................................Passed check xml................................................................Passed check json...............................................................Failed - hook id: check-json - exit code: 1 tests/variables/tcpmd5user/titanium/default_on_updated_state/data.json: Failed to json decode (Expecting property name enclosed in double quotes: line 15 column 48 (char 552)) tests/variables/bgpfunctional/create_bgp/post_data.json: Failed to json decode (Expecting value: line 3 column 18 (char 32)) tests/variables/pcepuser/titanium/set_timer_value/data.json: Failed to json decode (Expecting value: line 2 column 36 (char 37)) tests/variables/bgpfunctional/addNeighborsContainer_bgp/post_data.json: Failed to json decode (Expecting value: line 6 column 26 (char 129)) tests/variables/bgpfunctional/addNeighbor_bgp/post_data.json: Failed to json decode (Expecting value: line 5 column 22 (char 85)) tests/variables/tcpmd5user/titanium/default_on_state/data.json: Failed to json decode (Expecting property name enclosed in double quotes: line 15 column 48 (char 552)) tests/variables/bgpuser/local_as/adj_rib_out/data.json: Failed to json decode (Expecting value: line 10 column 37 (char 288)) check for added large files..............................................Passed check for merge conflicts................................................Passed check for case conflicts.................................................Passed mixed line ending........................................................Failed - hook id: mixed-line-ending - exit code: 1 - files were modified by this hook bgp/util/src/test/resources/BgpMessage_Hex_InvalidLength.bin: fixed mixed line endings Tabs remover.............................................................Passed shellcheck...............................................................Failed - hook id: shellcheck - exit code: 1 In tests/tools/pcep_updater/mock.sh line 17: for i in {1..3} ^-^ SC2034 (warning): i appears unused. Verify use (or export if used externally). ^----^ SC3009 (warning): In POSIX sh, brace expansion is undefined. In tests/tools/pcep_updater/mock.sh line 23: echo "PCC MOCK Process id for $a iteration is $process_id" ^-- SC2154 (warning): a is referenced but not assigned. For more information: https://www.shellcheck.net/wiki/SC2034 -- i appears unused. Verify use (or ... https://www.shellcheck.net/wiki/SC2154 -- a is referenced but not assigned. https://www.shellcheck.net/wiki/SC3009 -- In POSIX sh, brace expansion is u... prettier.................................................................Failed - hook id: prettier - files were modified by this hook .pre-commit-config.yaml README.md tests/README.md INFO.yaml yamllint.................................................................Passed pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 51cc48ae1f..65a634ff33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ default_language_version: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0 + rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0 hooks: - id: trailing-whitespace exclude: '^.*\.(bin|patch|diff)$' @@ -22,33 +22,33 @@ repos: - id: check-xml - id: check-json - id: check-added-large-files - args: ['--maxkb=10240'] # 10MB + args: ["--maxkb=10240"] # 10MB - id: check-merge-conflict - id: check-case-conflict - id: mixed-line-ending - args: ['--fix=lf'] + args: ["--fix=lf"] - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: a30f0d816e5062a67d87c8de753cfe499672b959 # frozen: v1.5.5 + rev: a30f0d816e5062a67d87c8de753cfe499672b959 # frozen: v1.5.5 hooks: - id: remove-tabs exclude: '^(.*\.go|.*\.bin|docs/make.bat|docs/Makefile|.*\.patch|.*\.diff)$' - repo: https://github.com/shellcheck-py/shellcheck-py - rev: a23f6b85d0fdd5bb9d564e2579e678033debbdff # frozen: v0.10.0.1 + rev: a23f6b85d0fdd5bb9d564e2579e678033debbdff # frozen: v0.10.0.1 hooks: - id: shellcheck - args: ['-x', '--severity=warning'] + args: ["-x", "--severity=warning"] - repo: https://github.com/pre-commit/mirrors-prettier - rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8 + rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8 hooks: - id: prettier types_or: [yaml, markdown] exclude: '^(.*\.template|.*\.patch|.*\.diff)$' - repo: https://github.com/adrienverge/yamllint - rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # frozen: v1.35.1 + rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # frozen: v1.35.1 hooks: - id: yamllint - args: ['-c', '.yamllint'] + args: ["-c", ".yamllint"] diff --git a/INFO.yaml b/INFO.yaml index 136e508d44..b9bb9e397b 100644 --- a/INFO.yaml +++ b/INFO.yaml @@ -1,67 +1,67 @@ --- -project: 'bgpcep' -project_creation_date: '2013-07-18' -project_category: '' -lifecycle_state: 'Incubation' +project: "bgpcep" +project_creation_date: "2013-07-18" +project_category: "" +lifecycle_state: "Incubation" project_lead: &odl_bgpcep_ptl - name: 'Robert Varga' - email: 'nite@hq.sk' - company: '' - id: 'rovarga' - timezone: 'Unknown/Unknown' + name: "Robert Varga" + email: "nite@hq.sk" + company: "" + id: "rovarga" + timezone: "Unknown/Unknown" primary_contact: *odl_bgpcep_ptl issue_tracking: - type: 'jira' - url: 'https://jira.opendaylight.org/projects/' - key: 'bgpcep' + type: "jira" + url: "https://jira.opendaylight.org/projects/" + key: "bgpcep" mailing_list: - type: 'groups.io' - url: 'app-dev@lists.opendaylight.org' - tag: '[]' + type: "groups.io" + url: "app-dev@lists.opendaylight.org" + tag: "[]" realtime_discussion: - type: 'irc' - server: 'freenode.net' - channel: '#opendaylight' + type: "irc" + server: "freenode.net" + channel: "#opendaylight" meetings: - - type: 'zoom' - agenda: '' - url: 'https://zoom.us/j/185572371' - server: 'zoom.us' - number: '185572371' - repeats: 'Alternative Thursdays' - time: '08:30pm to 09:00pm PST' + - type: "zoom" + agenda: "" + url: "https://zoom.us/j/185572371" + server: "zoom.us" + number: "185572371" + repeats: "Alternative Thursdays" + time: "08:30pm to 09:00pm PST" repositories: - - bgpcep + - bgpcep committers: - - <<: *odl_bgpcep_ptl - - name: 'Claudio David Gasparini' - email: 'claudio.gasparini@pantheon.tech' - company: 'pantheon' - id: 'cdgasparini' - timezone: 'Unknown/Unknown' - - name: 'Dana Kutenicsova' - email: 'dkutenicsova@frinx.io' - company: 'frinx' - id: 'dkutenicsova' - timezone: 'Unknown/Unknown' - - name: 'Ajay Lele' - email: 'ajayslele@gmail.com' - company: 'VMware' - id: 'ajayslele' - timezone: 'America/Los Angeles' - - name: 'Olivier Dugeon' - email: 'olivier.dugeon@orange.com' - company: 'Orange' - id: 'odd22' - timezone: 'CET/UTC+2' + - <<: *odl_bgpcep_ptl + - name: "Claudio David Gasparini" + email: "claudio.gasparini@pantheon.tech" + company: "pantheon" + id: "cdgasparini" + timezone: "Unknown/Unknown" + - name: "Dana Kutenicsova" + email: "dkutenicsova@frinx.io" + company: "frinx" + id: "dkutenicsova" + timezone: "Unknown/Unknown" + - name: "Ajay Lele" + email: "ajayslele@gmail.com" + company: "VMware" + id: "ajayslele" + timezone: "America/Los Angeles" + - name: "Olivier Dugeon" + email: "olivier.dugeon@orange.com" + company: "Orange" + id: "odd22" + timezone: "CET/UTC+2" tsc: - # yamllint disable rule:line-length - approval: '' - changes: - - type: 'Approval' - name: 'TSC Vote' - link: 'https://wiki.opendaylight.org/display/ODL/BGPCEP+Committer+Approval' - - type: 'Approval' - name: 'Committer Approval' - link: 'https://lists.opendaylight.org/g/app-dev/topic/72808144#353' + # yamllint disable rule:line-length + approval: "" + changes: + - type: "Approval" + name: "TSC Vote" + link: "https://wiki.opendaylight.org/display/ODL/BGPCEP+Committer+Approval" + - type: "Approval" + name: "Committer Approval" + link: "https://lists.opendaylight.org/g/app-dev/topic/72808144#353" diff --git a/README.md b/README.md index 2b8ccd60a7..4458e875a3 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,20 @@ into the underlying network. ## DIRECTORY ORGANIZATION -* concepts: - * Common networking concepts, shared between the protocols +- concepts: + - Common networking concepts, shared between the protocols -* util: - * Common utility classes +- util: + - Common utility classes -* bgp: - * BGP-related artifacts +- bgp: + - BGP-related artifacts -* pcep: - * PCEP-related artifacts +- pcep: + - PCEP-related artifacts -* rsvp: - * RSVP modeling concepts (needed by pcep) +- rsvp: + - RSVP modeling concepts (needed by pcep) ## HOW TO BUILD diff --git a/bgp/util/src/test/resources/BgpMessage_Hex_InvalidLength.bin b/bgp/util/src/test/resources/BgpMessage_Hex_InvalidLength.bin index 6f6569d600..de62ce0a7a 100644 --- a/bgp/util/src/test/resources/BgpMessage_Hex_InvalidLength.bin +++ b/bgp/util/src/test/resources/BgpMessage_Hex_InvalidLength.bin @@ -1,2 +1,2 @@ -ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff -00 00 02 +ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +00 00 02 diff --git a/tests/README.md b/tests/README.md index e6d027b451..8db29ba37a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,6 +1,7 @@ # CSIT - Continuous System Integration Test ## Overview + This directory contains **Continuous System Integration Tests (CSIT)** and associated testing tools for the **BGPCEP** project. Test are written using common python testing framework, PyTest. These tests are used to test the core **BGP** and **PCEP** functionality of Opendaylight distribution. These tests are run directly against @@ -8,15 +9,17 @@ built opendaylight distribution with its associated test tools without relying o like nexus. ## Test File Origin and History + Test data files and test tools scripts contained in this repository were originally created as part of separate testing project which used Robot Framework library for system testing. Now as part of moving to more lightweight and simpler PyTest framework part of the original test files were reused. ## Directory Structure + The main directory structure is as following: | Directory | Description | -|:----------------|:---------------------------------------------------------------------------------------------------------------------------| +| :-------------- | :------------------------------------------------------------------------------------------------------------------------- | | `allure-result` | Directory used for storing Allure reports generated during test runs. | | `libraries` | Directory containing reusable test functions used in test cases. | | `results` | Directory used for storing test results (e.g., logs, performance metrics). | @@ -26,21 +29,30 @@ The main directory structure is as following: | `variables` | Directory containing test data (mostly templates used for RESTCONF calls). | ## Test Execution + Tests can be executed using two primary methods: ### 1. Part of maven build + Test can be run directly during maven build using `integration-tests` profile + ```sh mvn clean install -Pintegration-tests ``` + ### 2. Using tox command + Tests can be also run separately using tox tool which needs to be invoked from tests directory by running commands such as: + ```sh cd tests tox -e pytest ``` + ### Test results + Test results are evaluated using allure reporting system. To view the generated test report run the following command: + ```sh allure serve tests/allure-results/ ```